package ro.brite.android.nehe05;

import ro.brite.android.opengl.common.NiceEGLConfigChooser;
import android.app.Activity;
import android.graphics.PixelFormat;
import android.opengl.GLSurfaceView;
import android.os.Bundle;


public class GlApp extends Activity {
	
	private GLSurfaceView surface;
	private GlRenderer renderer;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        surface = new GLSurfaceView(this);
		surface.setEGLConfigChooser(new NiceEGLConfigChooser());
		surface.getHolder().setFormat(PixelFormat.RGBA_8888);
        renderer = new GlRenderer();
        surface.setRenderer(renderer);
        setContentView(surface);
    }

	@Override
	protected void onPause() {
		super.onPause();
		surface.onPause();
	}

	@Override
	protected void onResume() {
		super.onResume();
		surface.onResume();
	}
	
}